Skip to content

fix: upgrade Go to version 1.24.2 and other dependenices - #114

Closed
wilfredmulenga wants to merge 20 commits into
mainfrom
fix/reearthx-update-2
Closed

fix: upgrade Go to version 1.24.2 and other dependenices#114
wilfredmulenga wants to merge 20 commits into
mainfrom
fix/reearthx-update-2

Conversation

@wilfredmulenga

@wilfredmulenga wilfredmulenga commented Dec 12, 2025

Copy link
Copy Markdown
Contributor

Dependency Updates:

  • Bump Go version in from version 1.21.1 to 1.24.2
  • Update golangci-lint GitHub Action to v9 and use linter version v2.5.0
  • Upgrade Reearthx version as previous version had index management logic that dropped indexes in other repos
  • Update various Go module dependencies

Code Refactoring & Improvements:

  • Made improvements in code refactor
  • Minor bug fixes and code style improvements

Removes unused imports and redundant assertions to simplify test cases.
Updates clone test logic for better clarity on deep copies.
Introduces a new test for shapefile generation, ensuring correctness
of attributes and cleanup of generated files.
Updates test assertions to ensure case consistency in theme values
and refines the cloning test to use memory address comparison via
reflection for better accuracy. These changes enhance the reliability
and clarity of the tests.
Updates assertions in unit tests to compare pointer addresses
instead of values, ensuring correct validation of object
independence.

This improves test accuracy by explicitly verifying that
cloned or derived objects are distinct in memory.
Updates error formatting in GraphQL debug mode to use proper string formatting.

Enhances shapefile tests by iterating through shapes for accurate point counts,
adding attribute checks only if the DBF file exists, and gracefully handling
missing files. Improves test reliability and addresses known library issues.
…ions

Adds "Content-Type: application/json; charset=UTF-8" headers to JSON responses for consistency in HTTP handlers and error responses.

Refines test assertions to validate expected fields, prevent unexpected fields, and handle nil values more robustly.

Improves `Clone` method tests by adding checks for nil pointers and nested structures to ensure deep cloning integrity.

Fixes redundant checks in `GroupList` and `Field` methods for better performance and clarity.
Updates test assertions to compare object pointers instead of values
for deep equality checks. Improves accuracy of tests by ensuring
distinct instances are validated when cloning or copying structures.
Updates clone-related unit tests to ensure deep object comparisons
use address-of operators for consistent reference checks. This prevents
false positives when asserting object independence and improves test reliability.
Replaces deprecated methods in end-to-end tests with updated ones for better readability and maintainability. Updates the `golangci-lint` version and removes redundant configuration files. Refactors conditional blocks to use `switch` statements for improved clarity and consistency. Fixes typo-related issues and aligns variable usage across layers to avoid redundancy. Ensures proper error handling by correcting argument orders in `errors.Is` checks. Simplifies string replacement logic to use `ReplaceAll` for better efficiency.

These changes collectively enhance code readability, test reliability, and maintainability while keeping dependencies up-to-date.
Introduces a `.golangci.yml` file to configure static analysis tools, enabling linters such as `govet`, `errcheck`, `staticcheck`, `unused`, and `ineffassign` to ensure code quality.

Also updates the dependency list by adding a checksum for `github.com/niemeyer/pretty`.

These changes improve code maintainability and ensure adherence to best practices.
Eliminates checks for short-mode testing that skipped tests in
server startup functions. This ensures all tests run regardless
of the testing mode, improving test coverage and consistency.
Updates the logic to prevent removal of layers if the parent
layer is a group type. This ensures that linked group layers
cannot be removed, addressing an inconsistency in the previous
implementation.

Refines error handling and maintains proper layer hierarchy.
Adds null and type checks to ensure stability when validating the
removal of infobox and story blocks. Prevents potential runtime
errors caused by nil or unexpected data structures in the response.

Updates test assertions to reflect cases where blocks are absent
by using explicit null checks instead of empty comparisons.
Updates infobox block validation logic to explicitly handle both
null and empty array cases as valid states. Improves robustness
by adding checks for array type and length before assertions.

Ensures consistent behavior in test cases for infobox block
operations, addressing potential edge cases in the data structure.
@wilfredmulenga wilfredmulenga changed the title fix: update reearthx fix!: upgrade Go to version 1.24.2 and other dependenices Dec 16, 2025
@wilfredmulenga wilfredmulenga changed the title fix!: upgrade Go to version 1.24.2 and other dependenices fix: upgrade Go to version 1.24.2 and other dependenices Dec 16, 2025
@wilfredmulenga

Copy link
Copy Markdown
Contributor Author

Will close this PR as we might not want to upgrade Go version yet https://github.com/reearth/reearth-classic/pull/115/changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant